package hcn.protocol.brandnew.dengji.guahao;

import lombok.Data;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.*;
import java.util.List;


/**
 * 门诊就诊记录查询 - ODS_02030006_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class ListRosteringResponse {

    /**
     * 排班记录
     */
    @XmlElementWrapper(name = "WorkLists")
    @XmlElement(name = "WorkList")
    private List<WorkList> workLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class WorkList {

        /**
         * 工作日期yyyy-MM-dd HH:mm:ss
         */
        @XmlElement(name = "WorkDate")
        private String workDate;
        /**
         * 周几
         */
        @XmlElement(name = "DayOfWeek")
        private String dayOfWeek;

        /**
         * 挂号科室名称
         */
        @XmlElement(name = "RegisteredDeptName")
        private String registeredDeptName;

        /**
         * 挂号科室代码
         */
        @XmlElement(name = "RegisteredDeptCode")
        private String registeredDeptCode;

        @XmlElementWrapper(name = "TimeFrames")
        @XmlElement(name = "TimeFrame")
        private List<TimeFrame> timeFrames;

        /**
         * 医生排班流水号（排班标识）
         */
        @XmlElement(name = "ScheduleMark")
        private String scheduleMark;
        /**
         * 上午坐班状态1-诊/2-停
         */
        @XmlElement(name = "SatusMorning")
        private String satusMorning;
        /**
         * 下午坐班状态1-诊/2-停;
         */
        @XmlElement(name = "StatusAfternoon")
        private String statusAfternoon;
        /**
         * 晚上坐班状态1-诊/2-停
         */
        @XmlElement(name = "StatusNight")
        private String statusNight;
        /**
         * 上午排班号源总数
         */
        @XmlElement(name = "MorningResourceSumTotal")
        private Integer morningResourceSumTotal;
        /**
         * 上午号源已使用数
         */
        @XmlElement(name = "MorningUsedNumber")
        private Integer morningUsedNumber;
        /**
         * 下午排班号源总数
         */
        @XmlElement(name = "AfternoonResourceSumTotal")
        private Integer afternoonResourceSumTotal;
        /**
         * 下午号源已使用数
         */
        @XmlElement(name = "AfternoonUsedNumber")
        private Integer afternoonUsedNumber;
        /**
         * 晚上排班号源总数
         */
        @XmlElement(name = "NightResourceSumTotal")
        private Integer nightResourceSumTotal;
        /**
         * 晚上号源已使用数
         */
        @XmlElement(name = "NightUsedNumber")
        private Integer nightUsedNumber;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class TimeFrame {

        /**
         * 医师排班类别代码
         */
        @XmlElement(name = "DoctorDutyType")
        @DictionaryMapping("hcn.base.dictionary.HCN_outpatientSchedulingService")
        private String DoctorDutyType;

        /**
         * 排班状态
         */
        @XmlElement(name = "ArrangeStatus")
        private String arrangeStatus;
        /**
         * 医生排班流水号（排班标识）
         */
        @XmlElement(name = "ScheduleMark")
        private String scheduleMark;

        /**
         * 排班号源总数
         */
        @XmlElement(name = "ResourceSumTotal")
        private Integer resourceSumTotal;

        /**
         * 号源已使用数
         */
        @XmlElement(name = "UsedNumber")
        private Integer usedNumber;

        /**
         * 剩余号源数
         */
        @XmlElement(name = "RemainNumber")
        private Integer remainNumber;
        /**
         * 排班资源级别
         */
        @XmlElement(name = "ResourceLevelCode")
        private String resourceLevelCode;

    }

}
